/*
 * Copyright (c) 2017 zhangcm. All Rights Reserved.
 */
package com.jnzc.ocr.rest.app.shop.controller.app;

import com.jnzc.ocr.common.utils.DateUtils;
import com.jnzc.ocr.common.vo.UserVo;
import com.jnzc.ocr.dependencies.rest.base.BaseController;
import com.jnzc.ocr.serv.shop.api.ShopCountApi;
import com.jnzc.ocr.serv.shop.entity.ShopCountIndex;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangcm
 * @version 1.0, 2017/11/26
 */
@Api(tags = {"app - 首页接口"})
@RestController
@RequestMapping("/app/index")
public class AppIndexController extends BaseController {

    @Autowired
    private ShopCountApi shopCountApi;

    @ApiOperation(value = "统计")
    @GetMapping("/count")
    public ShopCountIndex count(){
        UserVo userVo = super.get();
        return shopCountApi.countIndex(userVo.getShopId());
    }
}
